function reservation(caseNo,memberId,caseId) {
    if(caseNo==1 || caseNo=='1'){
        swal("信息提示!","没有病例，不能预约","warning");
        return;
    }
    location.href=ctx+"/director/reservationInstroe/RI?caseNo="+caseNo+"&memberId="+memberId+"&caseId="+caseId;
}

function xInfo(caseId){
    if(caseId==1 || caseId=='1'){
        swal("信息提示!","没有病例，不能预约","warning");
        return;
    }
    location.href=ctx+"/director/xInfo/searchXPosition?caseId="+caseId;
}

function showValue3(e) {
    $(e).attr("name","xPosition");
    $("#label1").show();
    var a = $(e).parent().next().find("input").val();
    var length = $(e).prev().html();
    length=parseInt(length.substring(0,1))+1;
    if(typeof(a)=="undefined") {
        var addInput = '<div>\
            <label class="">1、</label>\
        <input  style="margin-left:15px;" onfocus="showValue3(this)" type="text"/>\
            </div>';
        $("#chakan").append(addInput);
    }
    $(e).parent().next().find("label").html(length+"、");
}

function viewXInfo(e){
    var caseId = $("[name=caseId]").val();
    if(caseId==null || caseId==''){
        swal("信息提示!","没有病例，不能查看","warning");
        return;
    }
    var param = $("#checkForm").serialize();
    $.ajax({
        data:param,
        dataType:'json',
        async:false,
        url:ctx+"/director/xInfo/viewXInfo",
        success:function(xInfoList){
            $("#checkSee").children().remove();
            $(xInfoList).each(function(i){
                var $xSee = '<p><span>'+(i+1)+'、'+'</span>'+this.xSee+'</p>';
                $("#checkSee").append($xSee);
            });

            $("#xDiagnose").children().remove();
            $(xInfoList).each(function(i){
                var $xDiagnose = '<p><span>'+(i+1)+'、'+'</span>'+this.xDiagnose+'</p>';
                $("#xDiagnose").append($xDiagnose);
            });
        }
    });

}